package jpa.entitys.promis.common;

import java.io.Serializable;
import javax.persistence.*;

/**
 * The primary key class for the MASTER_STATUS database table.
 * 
 */
@Embeddable
public class MasterStatusPK implements Serializable {
	//default serial version id, required for serializable classes.
	private static final long serialVersionUID = 1L;

	@Column(name="GROUP_TYPE", unique=true, nullable=false, length=10)
	private String groupType;

	@Column(unique=true, nullable=false, length=1)
	private String status;

    public MasterStatusPK() {
    }
	public String getGroupType() {
		return this.groupType;
	}
	public void setGroupType(String groupType) {
		this.groupType = groupType;
	}
	public String getStatus() {
		return this.status;
	}
	public void setStatus(String status) {
		this.status = status;
	}

	public boolean equals(Object other) {
		if (this == other) {
			return true;
		}
		if (!(other instanceof MasterStatusPK)) {
			return false;
		}
		MasterStatusPK castOther = (MasterStatusPK)other;
		return 
			this.groupType.equals(castOther.groupType)
			&& this.status.equals(castOther.status);

    }
    
	public int hashCode() {
		final int prime = 31;
		int hash = 17;
		hash = hash * prime + this.groupType.hashCode();
		hash = hash * prime + this.status.hashCode();
		
		return hash;
    }
}